#ifndef CATEGORY_H
#define CATEGORY_H

#include <iostream>
#include <string>
#include<vector>
#include"Item.h"
#include"DateTime.h"
#include <string>
using namespace std;

class Category{
private:
	string _name;
	double _usedBudget;
	vector<Item> expenseItem;
public:
	Category(string name);
	string toString();
	string toString(const vector<int>& result);
	string getName();
	void updateName(string newName);
	void addItem(DateTime date, string name, double amount, PaymentStatus status);
	void updateItem(int index, DateTime date, string name, double amount, PaymentStatus status);
	void deleteItem(int index);
	vector<int> search(DateTime date);
	vector<Item> getExpenseItem();
	void insertItem(Item item,int index);
	double getUsedBudget(const DateTime& date);
	void calculatePayable(double amount, vector<int>& payableIndex);
};

#endif